﻿using System;
using System.Collections.Generic;
using System.Data.Linq.Mapping;
using System.Linq;
using System.Text;
using Chowpoo.Sql;

namespace CourseSystem.Core.Entities
{
    [Table(Name = "User")]
    public class UserInfo : IDetach
    {
        public UserInfo()
        { }
        #region Model
        private int _id;
        private string _account = "";
        private string _name = "";
        private string _password = "";
        private int _type = 1;
        private int _studentid;
        /// <summary>
        /// 
        /// </summary>
        [Column(IsDbGenerated = true, IsPrimaryKey = true, IsVersion = true)]
        public int Id
        {
            set { _id = value; }
            get { return _id; }
        }
        /// <summary>
        /// 
        /// </summary>
        [Column]
        public string Account
        {
            set { _account = value; }
            get { return _account; }
        }
        /// <summary>
        /// 
        /// </summary>
        [Column]
        public string Name
        {
            set { _name = value; }
            get { return _name; }
        }
        /// <summary>
        /// 
        /// </summary>
        [Column]
        public string Password
        {
            set { _password = value; }
            get { return _password; }
        }
        /// <summary>
        /// 
        /// </summary>
        [Column]
        public int Type
        {
            set { _type = value; }
            get { return _type; }
        }
        /// <summary>
        /// 
        /// </summary>
        [Column]
        public int StudentId
        {
            set { _studentid = value; }
            get { return _studentid; }
        }
        #endregion Model

        public void Detach()
        {

        }
    }
}
